﻿using RayDen.Library.Core.Primitives;

namespace RayDen.Library.Entity.SceneGraph
{
    public class ReferenceNode : SceneGraphElement
    {
        public SceneGraphElement FindRoot;
        public int DataNodeId;

        public ReferenceNode(Transform o2w, Transform w2o, int did) : base(o2w, w2o)
        {
            this.DataNodeId = did;
        }


        public override object GetDataItem()
        {
            return DataNodeId;
        }

        protected override SceneGraphElement CloneInternal()
        {
            return new ReferenceNode(this.ObjectToWorld, this.WorldToObject, this.DataNodeId){ FindRoot = this.FindRoot };
        }
    }
}